package br.com.ebc.icontatos.dao;

import br.com.ebc.icontatos.genericdao.GenericDAO;
import br.com.ebc.icontatos.model.Perfil;
import br.com.ebc.icontatos.repository.PerfilRepository;

public class PerfilDAO extends GenericDAO<Perfil, Integer> implements PerfilRepository{

	@Override
	public Perfil findDescricao(String descricao) {
		return (Perfil) getEntityManager().createQuery("select p from Perfil as p where p.descricaoPerfil = '" + descricao + "'").getSingleResult();
	}

}
